package com.ssm.pre.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ssm.pre.service.OptionService;
import com.ssm.util.object.InputObject;
import com.ssm.util.object.OutputObject;

/**
 * 意见反馈
 * @author 马培淞
 *
 */
@Controller
public class OptionController {

	@Autowired
	private OptionService optionService;
	
	/**
	 * 微信端增加一条意见反馈
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/gateway/OptionController/addOption")
	@ResponseBody
	public void addOption(InputObject inputObject, OutputObject outputObject) throws Exception{
		optionService.addOption(inputObject, outputObject);
	}
	
	/**
	 * 根据ID删除一条记录
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/OptionController/deleteOptionById")
	@ResponseBody
	public void deleteOption(InputObject inputObject, OutputObject outputObject) throws Exception{
		optionService.deleteOptionById(inputObject, outputObject);
	}
	
	/**
	 * 查询所有的意见反馈记录
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/OptionController/queryOptionByList")
	@ResponseBody
	public void queryOptionByList(InputObject inputObject, OutputObject outputObject) throws Exception{
		optionService.queryOptionByList(inputObject, outputObject);
	}
}
